package at.fhj.itm11.forum.beans.stubs;

import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.security.Principal;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import java.util.Set;

import javax.faces.context.ExternalContext;

public class ExternalContextStub extends ExternalContext {

	private Map<String, String> requestParameterMap = new HashMap<String, String>();

	@Override
	public void dispatch(String path) throws IOException {

	}

	@Override
	public String encodeActionURL(String url) {

		return null;
	}

	@Override
	public String encodeNamespace(String name) {

		return null;
	}

	@Override
	public String encodeResourceURL(String url) {

		return null;
	}

	@Override
	public Map<String, Object> getApplicationMap() {

		return null;
	}

	@Override
	public String getAuthType() {

		return null;
	}

	@Override
	public Object getContext() {

		return null;
	}

	@Override
	public String getInitParameter(String name) {

		return null;
	}

	@SuppressWarnings("rawtypes")
	@Override
	public Map getInitParameterMap() {

		return null;
	}

	@Override
	public String getRemoteUser() {

		return null;
	}

	@Override
	public Object getRequest() {

		return null;
	}

	@Override
	public String getRequestContextPath() {

		return null;
	}

	@Override
	public Map<String, Object> getRequestCookieMap() {

		return null;
	}

	@Override
	public Map<String, String> getRequestHeaderMap() {

		return null;
	}

	@Override
	public Map<String, String[]> getRequestHeaderValuesMap() {

		return null;
	}

	@Override
	public Locale getRequestLocale() {

		return null;
	}

	@Override
	public Iterator<Locale> getRequestLocales() {

		return null;
	}

	@Override
	public Map<String, Object> getRequestMap() {

		return null;
	}

	@Override
	public Map<String, String> getRequestParameterMap() {
		return requestParameterMap;
	}

	@Override
	public Iterator<String> getRequestParameterNames() {

		return null;
	}

	@Override
	public Map<String, String[]> getRequestParameterValuesMap() {

		return null;
	}

	@Override
	public String getRequestPathInfo() {

		return null;
	}

	@Override
	public String getRequestServletPath() {

		return null;
	}

	@Override
	public URL getResource(String path) throws MalformedURLException {

		return null;
	}

	@Override
	public InputStream getResourceAsStream(String path) {

		return null;
	}

	@Override
	public Set<String> getResourcePaths(String path) {

		return null;
	}

	@Override
	public Object getResponse() {

		return null;
	}

	@Override
	public Object getSession(boolean create) {
		return new HttpSessionStub();
	}

	@Override
	public Map<String, Object> getSessionMap() {

		return null;
	}

	@Override
	public Principal getUserPrincipal() {

		return null;
	}

	@Override
	public boolean isUserInRole(String role) {

		return false;
	}

	@Override
	public void log(String message) {

	}

	@Override
	public void log(String message, Throwable exception) {

	}

	@Override
	public void redirect(String url) throws IOException {
		if (url.equals("throw")) {
			throw new IOException();
		}
	}

}
